package com.ibeetl.admin.console.web.query.stat;

import com.ibeetl.admin.core.annotation.Query;
import com.ibeetl.admin.core.util.Tool;
import com.ibeetl.admin.core.web.query.PageParam;
import org.apache.commons.lang3.StringUtils;

import java.util.Date;

public class RegistStatQuery extends PageParam {

	//统计时间
	@Query(name="统计时间",display=true,type=Query.TYPE_DATE_BETWEEN)
	private String createTimeRange;
	private Date createTimeMin;
	private Date createTimeMax;


	public String getCreateTimeRange() {
		return createTimeRange;
	}

	public void setCreateTimeRange(String createTimeRange) {

		this.createTimeRange = createTimeRange;
		if(StringUtils.isEmpty(createTimeRange)) {
			return ;
		}
		Date[] ds = Tool.parseDataRange(createTimeRange);
		this.createTimeMin=ds[0];
		this.createTimeMax =ds[1];
	}

	public Date getCreateTimeMin() {
		return createTimeMin;
	}

	public void setCreateTimeMin(Date createTimeMin) {
		this.createTimeMin = createTimeMin;
	}

	public Date getCreateTimeMax() {
		return createTimeMax;
	}

	public void setCreateTimeMax(Date createTimeMax) {
		this.createTimeMax = createTimeMax;
	}

}
